package com.example.demo.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class HelloController {
	@RequestMapping("/hello")
	public String index(ModelMap map) {
		map.addAttribute("host", "www.hai.com");
		return "Hello";
	}
	@RequestMapping("/toUser")
	public String toUser(ModelMap map) {
		return "User";
	}
}
